<template>
  <div class="box">
    <!-- 菜单页面内容 -->
    
    <div class="box_top">
      <!-- 头部 -->
      <div class="box_top_head">
        <van-nav-bar title="菜单" />
      </div>
      <van-tree-select style="margin-top:46px;" height="55vw" :items="items" :main-active-index.sync="active">
        <template #content>
          <van-image v-if="active === 0" src="https://img.yzcdn.cn/vant/apple-1.jpg" />
          <van-image v-if="active === 1" src="https://img.yzcdn.cn/vant/apple-2.jpg" />
        </template>
      </van-tree-select>
    </div>
    <!-- <van-empty
      class="custom-image"
      image="https://img.yzcdn.cn/vant/custom-empty-image.png"
      description="商品没有了"
    /> -->
    <!-- 底部导航组件 -->
    <bottomtab></bottomtab>
  </div>
</template>

<script>
import bottomtab from "../../components/bottomtab";
export default {
  data() {
    return {
      active: 0,
      items: [{ text: "分组 1" }, { text: "分组 2" }]
    };
  },
  // 注册组件
  components: {
    bottomtab
  }
};
</script>
<style scoped lang="less">
.box {
  width: 100vw;
  height: 100vh;
  padding: 0;
  margin: 0;
  .box_top {
    background-color: #f7f8fa;
    height: calc(100vh - 51px); //底部加1px的边框
    overflow: auto;
    border-bottom: 1px solid #f3f3f3;
    .box_top_head{
      position: fixed;
      width: 100%;
      top: 0;
      left: 0;
      height: 46px;
      background-color: #fff;
      z-index: 10;
    }
  }
}
 .custom-image .van-empty__image {
    width: 90px;
    height: 90px;
  }
</style>
